package org.example.flinksql.test.custom;

import org.apache.flink.table.functions.ScalarFunction;

public class TransIdentifyTypeFunc extends ScalarFunction {

    public Integer eval(String str) {
        if (null == str) {
            return null;
        }
        Integer code = null;

        //TODO: 待确认
        if (str.contains("非公示项")) {
            code = 0;
        } else if (str.contains("企业法人")) {
            code = 1;
        }

        return code;
    }
}
